// -----------------------------------------------------------
// Game Framework
// Copyright © 2024-2024 deadcycle. All rights reserved.
// Homepage: https://deadcycle.gitee.io
// Feedback: deadcycle@163.com
// -----------------------------------------------------------

namespace UIWidget
{
    public partial class ScrollRectBase
    {
        /// <summary>
        /// 滚动列表单元格的布局方式。
        /// </summary>
        public enum LayoutType
        {
            /// <summary>垂直布局。</summary>
            Vertical = 0b0001,

            /// <summary>水平布局。</summary>
            Horizontal = 0b0010,

            /// <summary>先垂直后水平布局。</summary>
            VerticalThenHorizontal = 0b0100,

            /// <summary>先水平后垂直布局。</summary>
            HorizontalThenVertical = 0b0101,
        }

        /// <summary>
        /// 边界单元格类型。
        /// </summary>
        protected static class CriticalType
        {
            /// <summary> 往上滑动时, 顶部首个需要隐藏的Cell。 </summary>
            public const byte UpToHide = 0;

            /// <summary> 往下滑动时, 底部首个需要隐藏的Cell。 </summary>
            public const byte DownToHide = 1;

            /// <summary> 往下滑动时, 顶部首个需要显示的Cell。 </summary>
            public const byte UpToShow = 2;

            /// <summary> 往上滑动时, 底部首个需要显示的Cell。 </summary>
            public const byte DownToShow = 3;
        }

        /// <summary>
        /// 刷新滚动列表的方式。
        /// </summary>
        protected static class WillUpdateData
        {
            public const byte None = 0b0000;
            public const byte NeedUpdate = 0b0001;
            public const byte Reset = 0b0010;
            public const byte NeedUpdateAndReset = NeedUpdate | Reset;
        }
    }
}